#include <iostream>
using namespace std;
void main()
{
    int digit,sum=0,num=0;
    cout<<"Vvedite chislo:\n";
    cin>>digit;
    cout<<"symma = ";
    while(digit>0)
	{
        num=digit%10;
		digit=digit/10;
		sum=sum+num;
   }
	cout<<sum<<"\n";
}